package com.zcf.service.impl;

import com.zcf.pojo.Shopp;
import com.zcf.common.json.Body;
import com.zcf.mapper.ShoppMapper;
import com.zcf.service.ShoppService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 购物表 服务实现类
 * </p>
 *
 * @author loupeng
 * @since 2018-12-20
 */
@Service
public class ShoppServiceImpl extends ServiceImpl<ShoppMapper, Shopp> implements ShoppService {

	@Autowired
	ShoppMapper shoppMapper;

	@Override
	public Body queryShopping(Shopp shopp) {
		List<Shopp> lists = shoppMapper.queryShopping(shopp);
		if (lists.size() > 0) {
			return Body.newInstance(lists);
		}
		return Body.newInstance("查询失败");
	}

}
